package servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dao.ModInfoDao;

public class ModInfoServlet extends HttpServlet {
	public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException{
		String roomNum = request.getParameter("roomNum");
		String name = request.getParameter("guestName1");
		String tel = request.getParameter("tel1");
		String id = request.getParameter("identity1");
		System.out.println(roomNum);
		System.out.println(name);
		System.out.println(tel);
		System.out.println(id);
		ModInfoDao mod = new ModInfoDao();
		mod.updateGuest(roomNum, name, tel, id);
		response.sendRedirect("/hotel/selectInformation.jsp");
	}

}
